# -*- coding: utf-8 -*-

"""
Module implementing JoinDialog.
"""

from PyQt4.QtGui import QDialog
from PyQt4.QtCore import pyqtSignature

from Ui_JoinDlg import Ui_JoinDialog

class JoinDialog(QDialog, Ui_JoinDialog):
    """
    加入游戏对话框
    """
    def __init__(self, parent = None):
        """
        Constructor
        """
        QDialog.__init__(self, parent)
        self.setupUi(self)

        self.host=None
        self.port=None
        
        self.lineHost.setText('localhost')

    def accept(self):
        '''槽，确定按钮的响应'''
        self.host=str(self.lineHost.text())
        self.port=self.sbPort.value()
        QDialog.accept(self)
